<!DOCTYPE html>
<HTML>
<HEAD><meta name="viewport" content="width=device-width, initial-scale=1">
<Title>Chart.barLighting</Title>
<link type='text/css' rel='Stylesheet' href="maxchartapi.css" />
</HEAD>
<body bgcolor="#FFFFFF" text="#000000" topmargin="0" leftmargin="0" rightmargin="0" marginwidth="0" marginheight="0">

<p class="heading0">ChartDirector 7.0 (Java Edition)</p>
<p class="heading1"><a href="Chart.htm">Chart</a>.<wbr>barLighting</p>
<hr class="separator">
<p class="heading2a">Usage</p>
<div class="content">
public static int barLighting([ double startBrightness, double endBrightness ])
</div>
<p class="heading2">Description</p>
<div class="content">
A special shading effect for rectangular and polygonal bars on a <a href="BarLayer.htm">BarLayer</a>. It shades all surfaces of a 2D or 3D bar with gradient colors.<br><br>
For the front surface of a bar, the gradient is from base line of the bar to the end of the bar. For example, for a vertical bar pointing upwards, the gradient is from bottom to the top. Similarly, for a horizontal bar pointing rightwards, the gradient is from left to right.<br><br>
For a 3D bar, the gradient for the top surface of a vertical bar or the right surface of a horizontal bar is from front to back. The gradients for the side surfaces are the same as for the front surface.<br><br>
The gradient is specified with two brightness values at the gradient end points. A brightness less than 1 means the color is darkened, while a brightness greater than 1 means the color is brightened. For example, a brightness of 0.5 means the color is half as bright as the original color. If the original color is red, the color will become dark red. Conversely, a brightness of 2 means the color is twice as bright as the original color. If the original color is red, the color will become light red.<br><br>
The followings are some examples demonstrating this effect.<br><br>
<div style="width:100%;box-sizing:border-box;"><table width="100%" border="1" cellpadding="5" cellspacing="0"> <tr><th width="38%">Example<th>Description
<tr><td><a href="gradientbar.htm">Gradient Bar Chart</a><td>A 2D horizontal bar chart using the barLighting effect, with the brightness at the end points being 0.75 and 2.0.
<tr><td><a href="gradientmultibar.htm">Gradient Multi-Bar Chart</a><td>A 3D vertical bar chart using the barLighting effect, with the brightness at the end points being 0.75 and 1.75.
</table></div><br>
The barLighting method returns an integer representing this effect. The integer can be used as the second argument to <a href="Layer.setBorderColor.htm">Layer.setBorderColor</a> for <a href="BarLayer.htm">BarLayer</a> or <a href="BoxWhiskerLayer.htm">BoxWhiskerLayer</a> objects to apply the effect to bars or boxes.
</div>
<p class="heading2">Arguments</p>
<div class="content">
<div style="width:100%;box-sizing:border-box;">
<table border="1" cellpadding="5" cellspacing="0" width="100%"> 
<tr>
<th width="19%">Argument</th><th width="19%">Default</th><th>Description</th>
</tr>
<tr>
<td>startBrightness</td><td>0.75</td><td>The brightness at the starting point.</td></tr><tr><td>endBrightness</td><td>1.5</td><td>The brightness at the ending point.</td>
</tr>
</table>
</div>
</div>
<p class="heading2">Return Value</p>
<div class="content">
An integer representing the bar lighting effect.
</div>
<br><hr class="separator">
<div class="copyright">&copy; 2022 Advanced Software Engineering Limited. All rights reserved.</div>
</body>
</HTML>
